package me.zhengjie.vo.mes;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class RetNestVo {

    //
    private String containerCode;

    private List<RetNestSingleVo> itemBarCodeList;

    public void setRetNestSingleVo(String itemBarCode, Double materialNum) {
        itemBarCodeList.add(new RetNestSingleVo(itemBarCode, materialNum));
    }

    public RetNestVo(String containerCode) {
        this.containerCode = containerCode;
        this.itemBarCodeList = new ArrayList<>();
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    static class RetNestSingleVo {

        private String itemBarCode;

        private Double materialNum;

    }
}
